package com.zto.sch.advance.algorithms;

import org.junit.Test;

import java.util.Arrays;
import java.util.HashMap;

import static org.apache.commons.lang3.ArrayUtils.swap;

/**
 * @program: sch-diy-parent
 * @description:
 * @author: sch
 * @create: 2021-01-17 09:32
 **/
public class OtherSort {
    int[] arr = {3, 1, 8, 4, 2, 5};

    @Test
    public void testSortBubbo() {
        HashMap hashMap = new HashMap();
        hashMap.put("aa", "ee");
        System.out.println(Arrays.toString(arr));
        for (int i = 0; i < arr.length; i++) {
            for (int j = i; j < arr.length; j++) {
                if(arr[i]>arr[j]){
                    swap(arr,i,j);
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }

    private void swapArr(int[] arr, int i, int j) {
    }
}
